package com.runfast.paotui.dao.model;

import java.io.Serializable;
import java.util.Date;

public class RunfastLoginRecord implements Serializable {
    //所有账号登陸管理
    private Integer id;

    private String alias;

    /**
     * 登陆时间
     */
    private Date logintime;

    /**
     * 用户id或者商家id或者骑手id
     */
    private Integer accountid;

    /**
     * 0:用户id,1:商家id,2:骑手id
     */
    private Integer accounttype;

    /**
     * 退出时间（同类型的账号（主要针对不同账号），在同设备登陆，需将前一个账号退出，即该列不为null，否则会将上一个账号的消息页推送到当前设备）
     */
    private Date logouttime;

    private static final long serialVersionUID = 1L;
    public RunfastLoginRecord(){}
    public RunfastLoginRecord getRunfastLoginRecord(RunfastLoginRecord runfastLoginRecord){
        return runfastLoginRecord;
    }
    public RunfastLoginRecord setRunfastLoginRecord(RunfastLoginRecord runfastLoginRecord){
        return this.setRunfastLoginRecord(runfastLoginRecord);
    }
    public Integer getId() {
        return id;
    }

    public RunfastLoginRecord withId(Integer id) {
        this.setId(id);
        return this;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAlias() {
        return alias;
    }

    public RunfastLoginRecord withAlias(String alias) {
        this.setAlias(alias);
        return this;
    }

    public void setAlias(String alias) {
        this.alias = alias == null ? null : alias.trim();
    }

    public Date getLogintime() {
        return logintime;
    }

    public RunfastLoginRecord withLogintime(Date logintime) {
        this.setLogintime(logintime);
        return this;
    }

    public void setLogintime(Date logintime) {
        this.logintime = logintime;
    }

    public Integer getAccountid() {
        return accountid;
    }

    public RunfastLoginRecord withAccountid(Integer accountid) {
        this.setAccountid(accountid);
        return this;
    }

    public void setAccountid(Integer accountid) {
        this.accountid = accountid;
    }

    public Integer getAccounttype() {
        return accounttype;
    }

    public RunfastLoginRecord withAccounttype(Integer accounttype) {
        this.setAccounttype(accounttype);
        return this;
    }

    public void setAccounttype(Integer accounttype) {
        this.accounttype = accounttype;
    }

    public Date getLogouttime() {
        return logouttime;
    }

    public RunfastLoginRecord withLogouttime(Date logouttime) {
        this.setLogouttime(logouttime);
        return this;
    }

    public void setLogouttime(Date logouttime) {
        this.logouttime = logouttime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", alias=").append(alias);
        sb.append(", logintime=").append(logintime);
        sb.append(", accountid=").append(accountid);
        sb.append(", accounttype=").append(accounttype);
        sb.append(", logouttime=").append(logouttime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}